<%@ page language="java" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>表单</title>
	<link rel="stylesheet" type="text/css" href="../plugins/layuiadmin/layui/css/layui.css" media="all">
</head>
<%
String coClass = request.getParameter("coClass");
%>
<body class="body">

<form class="layui-form layui-from-pane" action="/addCollector" style="margin-top:20px" method="post">
  
  <div class="layui-form-item">
    <div class="layui-inline">
	    <label class="layui-form-label">角色名称</label>
	    <div class="layui-input-block">
	      <input type="text" name="roName" autocomplete="on" placeholder="请输入内容" class="layui-input" lay-verify="required" value="">
	    </div>
    </div>
  </div>
 <div class="layui-form-item">
 	<div class="layui-inline">
	    <label class="layui-form-label">考生管理</label>
	    <div class="layui-input-block">
	      	<input type="radio" name="userpower" value="无" title="无" checked>
      		<input type="radio" name="userpower" value="有" title="有">
	    </div>
	 </div>
	 <div class="layui-inline">
	    <label class="layui-form-label">管理账号</label>
	    <div class="layui-input-block">
	      	<input type="radio" name="adminpower" value="无" title="无" checked>
      		<input type="radio" name="adminpower" value="有" title="有">
	    </div>
	 </div>
  </div>
 <div class="layui-form-item">
	 <div class="layui-inline">
	    <label class="layui-form-label">系统配置</label>
	    <div class="layui-input-block">
	      	<input type="radio" name="systempower" value="无" title="无" checked>
      		<input type="radio" name="systempower" value="有" title="有">
	    </div>
	 </div>
	 <div class="layui-inline">
	    <label class="layui-form-label">栏目管理</label>
	    <div class="layui-input-block">
	      	<input type="radio" name="classpower" value="无" title="无" checked>
      		<input type="radio" name="classpower" value="有" title="有">
	    </div>
	 </div>
  </div>
 <div class="layui-form-item">
	 <div class="layui-inline">
	    <label class="layui-form-label">文章管理</label>
	    <div class="layui-input-block">
	      	<input type="radio" name="newspower" value="无" title="无" checked>
      		<input type="radio" name="newspower" value="有" title="有">
	    </div>
	 </div>
	 <div class="layui-inline">
	    <label class="layui-form-label">文章审核</label>
	    <div class="layui-input-block">
	      	<input type="radio" name="checkpower" value="无" title="无" checked>
      		<input type="radio" name="checkpower" value="有" title="有">
	    </div>
	 </div>
  </div>
  
    <div class="layui-form-item">
        <div class="layui-input-block">
            <button class="layui-btn  layui-btn-submit " lay-submit="" lay-filter="demo1">立即提交</button>
            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
        </div>
    </div>
</form>
<script type="text/javascript" src="../plugins/layuiadmin/layui/layui.js"></script>
<script>
    layui.use(['form','layer','jquery'], function(){
        var form = layui.form
                ,layer = layui.layer
                 ,$=layui.jquery,
                  table= layui.table
        //监听提交
        form.on('submit(demo1)', function(data){
            var rowStr = data.field;
            console.info(rowStr);
            $.ajax({
              	type:"post",
              	url:"../anRoleAdd.action",
              	data:{
              		rowstr:JSON.stringify(rowStr)
              	},
              	async:true,
              	cache:false,
              	success:function(res){
              		layer.msg('提交成功');
              		setTimeout(function(){
                        window.parent.location.reload();//修改成功后刷新父界面
                    }, 1000);
              	}
              });
            return false;
        });
    });
</script>
</body>
</html>